#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    bool containsDuplicate(vector<int>& nums) {
        sort(nums.begin(), nums.end());
        int prev = 0;
        int cin = 1;
        while (cin < nums.size())
        {
            if (nums[prev] == nums[cin])
            {
                return true;
            }
            cin++;
            prev++;
        }
        return false;

    }
};